package com.polaris.live.im.db.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey

/**
 * MessageExcludeEntity
 *
 * @author Created by lucas on 2023/10/21 10:24
 */
@Entity(
    tableName = "message_exclude",
    indices = [
        Index(value = ["msg_id", "user_id"], unique = true)
    ]
)
data class MessageExcludeEntity(
    /**
     * 数据库主键
     */
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "table_id")
    val tableId: Int? = null,
    /**
     * 用户id
     */
    @ColumnInfo(name = "user_id")
    val userId: Long,
    /**
     * 消息id
     */
    @ColumnInfo(name = "msg_id")
    val msgId: String,
    /**
     * timestamp时间戳
     */
    @ColumnInfo(name = "timestamp")
    var timestamp: Long,
)